package com.rock.app.jwt;

import cn.hutool.core.util.StrUtil;

public class JwtConfig {

    private String httpHeaderName = "Jwt";
    private String httpParameterKey;

    private String secret = "d7f8e208a0e446e9875ce89d0f2973cd";

    /**
     * 有效期，单位毫秒，
     * 不配置时，或者 小于等于 0 时，永久有效
     */
    private long validityPeriod = 0;

    public String getHttpHeaderName() {
        return httpHeaderName;
    }

    public void setHttpHeaderName(String httpHeaderName) {
        this.httpHeaderName = httpHeaderName;
    }

    public String getHttpParameterKey() {
        return httpParameterKey;
    }

    public void setHttpParameterKey(String httpParameterKey) {
        this.httpParameterKey = httpParameterKey;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public long getValidityPeriod() {
        return validityPeriod;
    }

    public void setValidityPeriod(long validityPeriod) {
        this.validityPeriod = validityPeriod;
    }

    public boolean isConfigOk() {
        return StrUtil.isNotBlank(secret);
    }


}
